const Tourist = require('../../model/tourist/Tourist')

function change(req,res){
  console.log(req.body)
  Tourist.findByIdAndUpdate(req.body._id, {
    username: req.body.username,
    password: req.body.password
  }, function(err,result){
    if (err) {
        res.json({
            code:0,
            msg: '修改失败'
        })
    }else{
        res.json({
            code:1,
            msg: '修改成功'
        })
    }
  })


  
}
module.exports = change